#ifndef Q2_HPP

#define Q2_HPP
#include <iostream>
#include <vector>
using namespace std;

void q2()
{

    string s = "";
    vector<string> vStr;

    while (1)
    {

        cout << "请输入字符串，输入quit视为停止" << endl;
        cin >> s;
        if (s.compare("quit") == 0)
            break;
        cout << "您的输入为" << s << endl;
        vStr.push_back(s);
    }

    if (!vStr.empty())
    {
        for (auto ite = vStr.end() - 1; ite != vStr.begin(); --ite)
        {
            cout << *ite << endl;
        }
        cout << *vStr.begin() << endl;
    }
}

#endif